package org.dxy.domain.event.equipment;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Value;
import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

/**
 * 设备故障已恢复事件
 * 故障已修复，设备状态恢复为可用，记录恢复时间
 * @author dxy
 * @createTime 2025/6/15 14:46
 */
@Value
@Builder
@AllArgsConstructor
public class EquipmentRecoveredEvent implements DomainEvent {
    /**
     * 设备 ID
     */
    Long equipmentId;
    
    @Override
    public Long aggregateId() {
        return equipmentId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.EQUIPMENT.getKey();
    }
    
    @Override
    public String eventType() {
        return EquipmentEventTypeEnum.RECOVERED.getKey();
    }
}